import java.util.Scanner;

/**
 * Created with IntelliJ IDEA.
 * Description: 牛客网.简单题.统计每个月兔子的总数
 */

class Main {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int n = scanner.nextInt();
        int num1 = 1;
        int num2 = 1;
        int temp = 0;
        if(n < 3){
            System.out.println(num1);
            return;
        }
        for(int i = 3; i <= n; i++) {
            temp = num1;
            num1 = num2;
            num2 = temp + num1;
        }
        System.out.println(num2);
    }
}

public class Test {
}
